package com.ktjiaoyu.crm.util;

import org.apache.shiro.crypto.hash.Md5Hash;

public class PasswordUtils {

    /**
     * 对明文密码进行MD5加密
     * @param plaintextPassword
     * @return
     * @throws IllegalArgumentException
     */
    public static String encryptPassword(Object plaintextPassword) throws IllegalArgumentException {
        String salt = "czkt";
        Md5Hash md5Hash = new Md5Hash(plaintextPassword, salt,2);
        return md5Hash.toString();
    }

}
